package com.pattern.CreationalPatterns.AbstractFactoryPattern;

/**
 * 工厂生成器
 * @author: 月光伴奏
 * @Date 2017-11-28 18:59
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("SHAPE")){
            return new ShapeFactory();
        } else if(choice.equalsIgnoreCase("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
